#ifndef __ATL_SYSCALL_H__
#define __ATL_SYSCALL_H__
#include <stdint.h>
#define SCP_MAGIC 0xBADCA11

#define SC_READ 0x0  ///
#define SC_WRITE 0x1 ///
#define SC_SEEK 0x2  ///
#define SC_OPEN 0x3  ///
#define SC_CLOSE 0x4 ///
#define SC_MKDIR 0x5 ///
#define SC_RMDIR 0x6
#define SC_LINK 0x7
#define SC_UNLINK 0x8
#define SC_REMOVE 0x9
#define SC_MOUNT 0xA ///
#define SC_UMOUNT 0xB///
#define SC_CHDIR 0xC ///
#define SC_CHMOD 0xD
#define SC_TIME 0xE
#define SC_EXIT 0xF  ///
#define SC_EXECVE 0x10
#define SC_FORK 0x11
#define SC_GETPID 0x12///
#define SC_SBRK 0x13
#define SC_MKLOOP 0x14//
#define SC_REGDR 0x15//
#define SC_REGSF 0x16//
#define SC_REGIR 0x17//
#define SC_AVAIL 0x18//

extern int errno;

typedef struct scp_s {
	uint32_t scp_magic;
	uint32_t function_id;
	uint32_t parameters[10];
	uint32_t errno;
	uint32_t result;
} syscall_parameter_block;

typedef void(*syscall_handler)(syscall_parameter_block *p);

void syscall(syscall_parameter_block *p);

void syscall_default(syscall_parameter_block *p);

void syscall_sethandler(syscall_handler handler);

#endif